from Common.MTurk.BaseParams import BaseParams

class GetAssignmentsForHITParams(BaseParams):
    '''
    The GetAssignmentsForHIT operation retrieves completed assignments for a HIT. 
    '''

    def __init__(self, hITId):
        BaseParams.__init__(self, 'GetAssignmentsForHIT') #operation
        self.parameters["HITId"]=hITId
    

if __name__ == "__main__":
    chp = GetAssignmentsForHITParams(12345)
    print chp.parameters


    
"""
<?xml version="1.0"?>
<GetAssignmentsForHITResponse>
    <OperationRequest>
        <RequestId>b4a042bd-c944-470a-a1b3-38594553694b</RequestId>
    </OperationRequest>
    <GetAssignmentsForHITResult>
        <Request>
            <IsValid>True</IsValid>
        </Request>
        <NumResults>1</NumResults>
        <TotalNumResults>1</TotalNumResults>
        <PageNumber>1</PageNumber>
        <Assignment>
            <AssignmentId>1M78A8HXYAPTOS3RN605VW6NG7CG2Y</AssignmentId>
            <WorkerId>A2NINNA1TC9683</WorkerId>
            <HITId>1OIGFTWQ0VT4OQG20VKN1CG3NGDEUV</HITId>
            <AssignmentStatus>Approved</AssignmentStatus>
            <AutoApprovalTime>2010-12-25T03:23:14Z</AutoApprovalTime>
            <AcceptTime>2010-12-10T03:23:09Z</AcceptTime>
            <SubmitTime>2010-12-10T03:23:14Z</SubmitTime>
            <ApprovalTime>2010-12-25T03:27:33Z</ApprovalTime>
            <Answer>
                &lt;?xml version="1.0" encoding="UTF-8"?&gt;\n&lt;QuestionFormAnswers xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionFormAnswers.xsd"&gt;\n&lt;Answer&gt;\n&lt;QuestionIdentifier&gt;1&lt;/QuestionIdentifier&gt;\n&lt;FreeText&gt;dfgdfg&lt;/FreeText&gt...
"""